#ifndef multilinewidget_H
#define multilinewidget_H

#include <QWidget>
#include <QSqlQuery>
#include <QSqlRecord>
#include <QMap>
#include <QItemSelection>

class multilinetableview;

class multilinewidget : public QWidget
{
    Q_OBJECT
public:
    explicit multilinewidget(QWidget *parent = 0);
    ~multilinewidget();
    void initControl();
    void setLayoutWidget();

private:
    void showData(QString orderBy = "", QString sorttype = "");
    void releseData();
    void setItemsSelected();
    void dataSort(int sort,int column);

protected:
    void paintEvent(QPaintEvent *event);
    void resizeEvent(QResizeEvent *event);

private:
    struct STRUCT_TASK_INFO
    {
        QString taskid;				//任务id
        QString taskname;			//任务名称
        QString tasktype;			//任务类型
        QString taskshowstatus;		//任务显示状态
        int pixmaptype;
    };
    STRUCT_TASK_INFO* m_ptaskinfo;
    enum TASK_FIELDS{
            id = 0,taskname,tasktype,taskstatus,show_details,show_results,pixmaptype
        };
    multilinetableview *m_tableview;
    QMap<int, int> m_itemsselectedmap;

signals:

public slots:
    void headerSortClicked(int sort,int column);
    void selectionChanged(const QItemSelection &selected,const QItemSelection &deselected);
    void btnClicked(int row,int column);

};

#endif // multilinewidget_H
